<?php

return CMap::mergeArray(
                require(dirname(__FILE__) . '/main.php'), array(
            'name' => 'Front End',
//            'homeUrl' => 'http://localhost/fchic.vn',
            'components' => array(
                'urlManager' => array(
                    'urlFormat' => 'path',
                    'showScriptName' => false,
                    'rules' => array(
//                        'search/<item_name>' => 'search/tag',
//                        'search/<item_name>/<brand>' => 'search/brand',
                        '<controller:\w+>/<id:\d+>' => '<controller>/view',
                        '<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
                        '<controller:\w+>/<action:\w+>/<username:\w+>' => '<controller>/<action>',
                        '<controller:\w+>/<action:\w+>' => '<controller>/<action>',
                        '<item_name>' => 'search/tag',
                        '<item_name>/<brand>' => 'search/brand',
                    ),
                ),
                'errorHandler' => array(
                    // use 'site/error' action to display errors
                    'errorAction' => 'site/error',
                ),
                'user' => array(
                    // enable cookie-based authentication
                    'allowAutoLogin' => true,
                    'loginUrl' => array('user/login'),
                ),
                'authManager' => array(
                    'class' => 'CDbAuthManager',
                    'connectionID' => 'db',
                    'itemTable' => 'tbl_auth_item',
                    'itemChildTable' => 'tbl_auth_item_child',
                    'assignmentTable' => 'tbl_auth_assignment',
                    'defaultRoles' => array('guest'),
                ),
            ),
                )
);
?>
